import { FC } from "react";
import styles from "./index.module.scss";
import { VideoFace } from "@/api/search/index";
interface IProps {
  list: VideoFace[];
}
const VideoList: FC<IProps> = ({ list }) => {
  return (
    <div className={styles.VideoList}>
      <div className={styles.list_wrap}>
        {list.map((it, index) => {
          return (
            <div className={styles.listItem} key={index}>
              <div className={styles.left}>
                <img src={it.coverUrl} alt="" />
              </div>
              <div className={styles.content}>
                <div>
                  <span className={styles.title}>{it.title}</span>
                </div>
                <div>
                  <span className={styles.userName}>{it.userName}</span>
                </div>
                <div>
                  <span className={styles.playTime}>{it.playTime}</span>
                </div>
              </div>
            </div>
          );
        })}
      </div>
    </div>
  );
};

export default VideoList;
